package priv.pront.code.national.acwing.math;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
/*(a1^0 + a1^1 + ... + a1^k1) * ... * (an^0 + an^1 + ... + an^kn)*/
public class A871_约数之和 {

    static BufferedReader read = new BufferedReader(new InputStreamReader(System.in));

    public static void main(String[] args) throws Exception {
        int t = Integer.valueOf(read.readLine());
        Map<Integer, Integer> map = new HashMap();
        while (t-- > 0) {
            Integer a = Integer.valueOf(read.readLine());

            for (int i = 2; i <= a / i; i++) {
                if (a % i == 0) {
                    int cnt = 0;
                    while (a % i == 0) {
                        cnt++;
                        a /= i;
                    }
                    map.put(i, map.getOrDefault(i, 0) + cnt);
                }
            }
            if (a > 1) map.put(a, map.getOrDefault(a, 0) + 1);
        }

        long res = 1;
        int mod = (int) 1e9 + 7;
        for (Integer a : map.keySet()) {
            long sum = 0;
            int k = map.get(a);

            for (int i = 0; i <= k; i++) {
                long pow = 1;
                int tmp = i;
                while (tmp-- > 0) pow = pow * a % mod;
                sum = (sum + pow) % mod;
            }
            res = res * sum % mod;
        }
        System.out.println(res);
    }

}
